<?php
if( !get( 'ini_mark') ) :
	while(have_posts()): the_post();
	$media_thumb = ini_thumb(250, 250);
	if( get('ini_media_bg') && !get('ini_no_thumb') ) echo "<img id='gbk' src='".$media_thumb."' alt='{$post->post_title}' />\n<canvas id='gb'></canvas>";
?>
	<header id="meheader"<?php if( get('ini_no_thumb') ) echo "style=padding:0"?>>
<?php if( get_the_author_meta('ggplus')!="" ) echo "		<a href=\"https://plus.google.com/".get_the_author_meta('ggplus')."?rel=author\"></a>\n"?>
		<?php if( !get('ini_no_thumb') ){ ?><div class="cover"><div class="cover-box"><div class="clip"><img src="<?php echo $media_thumb?>" width="250" height="250" alt="<?php $post->post_title?>"></div></div></div><?php }?>
		<div class="mecontext"<?php if( get('ini_no_thumb') ) echo "style=min-height:0"?>>
			<h2 class="entry-title" property="v:title"><?php the_title()?></h2>
			<?php if(get('ini_rate')) fancyratings();?>
			<span><?php edit_post_link('编辑文章','<i class="icon-edit"></i> ')?></span>
			<section><?php
if( get_post_meta($post->ID, 'm_title', true) ) echo "<p><strong>专辑：</strong>".get_post_meta($post->ID, 'm_title', true)."</p>";
if( get_post_meta($post->ID, 'm_author', true) ) echo "<p><strong>作者：</strong>".get_post_meta($post->ID, 'm_author', true)."</p>";
if( get_post_meta($post->ID, 'm_year', true) )  echo "<p><strong>年份：</strong>".get_post_meta($post->ID, 'm_year', true)."</p>";
if( get_the_tags() )  echo "<p><strong>标签：</strong>".i_tags()."</p>";
if( !(ini_count($text))==0 ){    # 判断是否有文字
	echo '<div class="excerpt" property="v:description"><strong>简介：</strong>';
	ini_excerpt(150);
	echo "</div>\n";
}
?></section>
			<?php ini_bdshare()?>
		</div>
	</header>

<div id="content">
<div class="main">
<div class="hide"><?php ini_map()?></div>
<?php if(get('ini_ad3')) echo "<div class=\"ad3\">".get('ini_ad3_code')."</div>\n"; ?>
<div class="context">
<?php the_content()?> 
</div>
<?php post_page()?> 
<?php if( get('ini_ad4') ) echo "<div class=\"ad4\">".get('ini_ad4_code')."</div>\n"; ?>
<div class="post-nav">
	<div class="post-prev">
<?php $prev_post = get_previous_post();
echo get_previous_post() ?
	'		<i class="icon-double-angle-left"></i><a href="'.wp_get_shortlink( $prev_post->ID ).'">'.$prev_post->post_title.'</a>': '';?>
	</div>
	<div class="post-next">
<?php $next_post = get_next_post();
echo get_next_post() ?
	'		<a href="'.wp_get_shortlink( $next_post->ID ).'">'.$next_post->post_title.'</a><i class="icon-double-angle-right"></i>':
	'		如果给等待加一个期限，你希望是多久...';?>
	</div>
<small class="clear"></small>
</div>
<?php if(get('ini_post')) include "related.php"?>
</div>
<?php if('open'== $post->comment_status){?>
		<div class="main"><?php comments_template()?></div>
<?php }?>
<?php endwhile?>
<?php endif?>
</div>